home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / amiutils / q_t / raystorm / install_raystorm < prev    next >
Encoding:
Text File  |  1995-12-31  |  7.2 KB  |  253 lines

  1. ; Install_RayStorm - RayStorm installation script for Installer
  2. ;
  3. ; Copyright ⌐ 1995 Andreas Heumann
  4. ;
  5. ; $Id: Install_RayStorm,v 1.1 1995/10/08
  6. ;
  7. ;     Installer and Installer project icon
  8. ;     (c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
  9. ;     Reproduced and distributed under license from Commodore.
  10. ;
  11. ;     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  12. ;     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  13. ;     OR RESPONSIBILITY IS ASSUMED.
  14. ;
  15. ;
  16. (welcome "    Welcome to the " @app-name " 1.1 installation.\n")
  17.  
  18. ; What we are?
  19. (set app-name (cat @app-name " 1.1"))
  20.  
  21. ; "Needs"
  22. (set need-version 37)  ; version of operating system need by RayStorm
  23.  
  24. ; These directories are always present
  25. (set dir-pat (cat "(" "anims" "|" "docs" "|" "arexx" "|" "examples" "|" "brushes" "|" "objects" ")"))
  26.  
  27. ; The source directory name
  28. (set source-dir
  29.  (if (= 1 (exists @icon))
  30.   (pathonly (expandpath @icon))
  31.   (expandpath @icon)
  32.  )
  33. )
  34.  
  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36. (procedure
  37.  check-system-version
  38.  ;; is your Exec recent enough?
  39.  (set exec-version (/ (getversion) 65536))
  40.  (transcript "Running on exec version " exec-version ".")
  41.  (if (< exec-version need-version)    ; check operating system version
  42.   (
  43.    (message "The " @app-name " needs at least Exec version " need-version
  44.              " to run.\nYou have only version " exec-version ".\n"
  45.              "You can proceed with the installation, but consider "
  46.              "installing the " @app-name " with proper version of "
  47.              "the operating system."
  48.      (help "    The " @app-name " uses some system functions "
  49.             "that are not present or functional in earlier system "
  50.             "versions. Consider updating your system.\n"
  51.             "    If you have a later version of operating system "
  52.             "and are only now using older version: be sure to use "
  53.             "only release 2.04 or newer with the " @app-name ". "
  54.             "No damage happens if you run the " @app-name " with an "
  55.             "earlier operating system, however. It just "
  56.             "refuses to start.\n"
  57.             "    If you decide to continue, no changes will be made to "
  58.             "system startup files, so you must edit them yourself. "
  59.             "Refer instructions for manual installation."
  60.      )
  61.     )
  62.    (transcript "User decided to continue installation while running "
  63.                  "on operating system release earlier than 2.04."
  64.     )
  65.   )
  66.  )
  67. )
  68.  
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. (procedure
  71.  ;; select cpu type
  72.  check-cpu
  73.  (set cpu (database "cpu"))
  74.  (if (OR (= cpu "68000") (= cpu "68010"))
  75.   (set selcpu
  76.    (askchoice
  77.     (prompt (cat "Select the version of " app-name " to install."))
  78.     (help "Select the version you want to install. The files for your"
  79.           "CPU will be copied.")
  80.     (choices "68000" "68020 and above")
  81.     (default 0)
  82.    )
  83.   )
  84.   (set selcpu
  85.    (askchoice
  86.     (prompt (cat "Select the version of " app-name " to install."))
  87.     (help "Select the version you want to install. The files for your"
  88.           "CPU will be copied.")
  89.     (choices "68000" "68020 and above")
  90.     (default 1)
  91.    )
  92.   )
  93.  )
  94. )
  95.  
  96. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  97. (procedure select-destination-directory
  98.  ;; Select destination directory for the installation. We suggest the user
  99.  ;; to install to the place from where the installer was started. This is
  100.  ;; since normally this software will be unarchived to its proper location
  101.  ;; and the files don't have to be copied any more.
  102.  ;;
  103.  (transcript "Selecting destination directory for the installation.")
  104.  (while
  105.   (
  106.     (set @default-dest
  107.      (askdir
  108.       (prompt "Select directory where to install " app-name ".\n"
  109.               "You have to create a directory for " app-name " yourself."
  110.      )
  111.       (help "    Here you can specify location where to install "
  112.               "the " app-name ".\n"
  113.               "    Installation can be made on-place. "
  114.               "This is recommended if you have already unarchived "
  115.               "the " app-name " archive to its final location. "
  116.               "In this case "
  117.               "most of the files are left where they are. "
  118.               "Only necessary files are copied to different "
  119.               "positions.\n"
  120.      )
  121.       (newpath)
  122.       (default source-dir)
  123.     )
  124.    )
  125.    (if (= 2 (exists @default-dest))
  126.      0
  127.      (makedir @default-dest
  128.       (infos)
  129.      )
  130.     )
  131.   )
  132.  )
  133. )
  134.  
  135. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  136. (procedure
  137.  copy-files-to-destination ;;; Copy all files if not installing on-place
  138.  ;;
  139.  (if (= source-dir (expandpath @default-dest))
  140.   (message "\nSource and destination directories are the same, "
  141.             "not copying."
  142.     (help "    The " app-name " files don't have to be copied, "
  143.            "since the source and the destination directories are "
  144.            "the same."
  145.     )
  146.   )
  147.   ((transcript "Copying " app-name " files from " source-dir " to "
  148.                 @default-dest "."
  149.     )
  150.     (if (= selcpu 1)
  151.     (
  152.      (copyfiles
  153.       (source (tackon source-dir "RayStorm_020"))
  154.        (dest @default-dest)
  155.        (prompt "Copying files to the selected location.")
  156.       (newname "RayStorm")
  157.       (optional "askuser")
  158.      )
  159.      (copyfiles
  160.       (source (tackon source-dir "RayStorm_020.info"))
  161.        (dest @default-dest)
  162.        (prompt "Copying files to the selected location.")
  163.       (newname "RayStorm.info")
  164.        (optional "askuser")
  165.      )
  166.      (set dest-dir (tackon @default-dest "textures"))
  167.       (if (NOT (exists dest-dir))
  168.        (makedir dest-dir)
  169.       )
  170.       (copyfiles (all)
  171.         (source (tackon source-dir "textures_020"))
  172.         (dest dest-dir)
  173.         (prompt "Copying files to the selected location.")
  174.         (optional "askuser")
  175.       )
  176.     )
  177.     (
  178.      (copyfiles
  179.       (source (tackon source-dir "RayStorm_000"))
  180.        (dest @default-dest)
  181.        (prompt "Copying files to the selected location.")
  182.       (newname "RayStorm")
  183.        (optional "askuser")
  184.      )
  185.      (copyfiles
  186.       (source (tackon source-dir "RayStorm_000.info"))
  187.        (dest @default-dest)
  188.        (prompt "Copying files to the selected location.")
  189.       (newname "RayStorm.info")
  190.        (optional "askuser")
  191.      )
  192.      (set dest-dir (tackon @default-dest "textures"))
  193.       (if (NOT (exists dest-dir))
  194.        (makedir dest-dir)
  195.       )
  196.       (copyfiles (all)
  197.         (source (tackon source-dir "textures_000"))
  198.         (dest dest-dir)
  199.         (prompt "Copying files to the selected location.")
  200.         (optional "askuser")
  201.       )
  202.     )
  203.    )
  204.    (foreach source-dir dir-pat
  205.     (
  206.      (set dest-dir (tackon @default-dest @each-name))
  207.       (if (NOT (exists dest-dir))
  208.        (makedir dest-dir)
  209.       )
  210.       (copyfiles (all)
  211.         (source (expandpath @each-name))
  212.         (dest dest-dir)
  213.         (prompt "Copying files to the selected location.")
  214.         (optional "askuser")
  215.       )
  216.      )
  217.     )
  218.    (copyfiles (source source-dir)
  219.      (dest @default-dest)
  220.      (prompt "Copying files to the selected location.")
  221.      (choices "anims.info" "Examples.jpg" "Readme" "Readme.mui" "Whats new.txt" "Docs.info")
  222.      (files)
  223.      (infos)
  224.      (optional "askuser")
  225.    )
  226.   )
  227.  )
  228. )
  229.  
  230. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  231. ;;;
  232. ;;; Installatation sequence
  233. ;;;
  234. (message "Please remember during this installation:\n\n"
  235.      "    Read the instructions provided behind the \"Help\" "
  236.      "buttons, if you are not absolutely sure what you are doing.\n"
  237. )
  238.  
  239. (complete 00)
  240. (transcript "On making " app-name ".")
  241. (check-system-version)
  242. (check-cpu)
  243. (complete 10)
  244. (select-destination-directory)
  245. (complete 20)
  246. (copy-files-to-destination)
  247. (complete 100)
  248.  
  249. ;;; All done!
  250.  
  251. ; EOF
  252.  
  253.